\documentclass[12pt]{article}
\usepackage{amsfonts}

\newcommand{\real}{{\rm Re}}
\newcommand{\imag}{{\rm Im}}

\begin{document}

\section{Folded Profile Scattered Power Correction}

This document describes a 2-bit scattered power correction algorithm
that can be used to correct folded pulsar profiles.  The algorithm
requires that the signal in each frequency channel has not been
significantly altered, such that the mean undigitized power can be
trivially computed from the mean digitized power.  This typically
means that either the data have not been coherently dedispersed or the
dispersion smearing in each frequency channel is less than the time
resolution of the folded profile.
%
The digitized power $\hat\sigma^2$ is given by equation (A5) of
Jenet \& Anderson (1998); hereafter JA98,
%
\[
\hat\sigma^2 = \sum_\Phi {\mathcal P}(\Phi)f(\Phi),
\label{eqn:A5}
\]
where $\Phi$ is the fraction of samples that fall between the chosen
thresholds, $f(\Phi)$ is the digitized power as a function of $\Phi$,
given by equation (A4) of JA98, and ${\mathcal P}(\Phi)$ is the
discrete probability distribution for $\Phi$, given by equation (A6)
of JA98.
%
The parameter $\Phi$ is eliminated by the summation in equation~(A5);
however, both $f(\Phi)$ and ${\mathcal P}(\Phi)$ are also
parameterized by the expectation value, $\langle\Phi\rangle$.
%
Therefore, equation~(A5) represents the relationship between the mean
digitized power and the mean value of $\Phi$.
%
That is, given the digitized power $\hat\sigma^2$, equation (A5) of
JA98 can be inverted to compute $\langle\Phi\rangle$, which can in
turn be used to estimate the mean undigitized power $\sigma^2$ and the
mean scattered power $A$ via equations (45) and (43) of JA98,
respectively.

Equation~(A5) can be inverted using the Newton-Raphson method and the
partial derivatives of equations (A4) through (A6) with respect to
$\langle\Phi\rangle$.
%
These are simplified in the case of two-bit sampling by noting that
equation (A4) reduces to
%
\[
f(\Phi) = \langle\Phi\rangle y_3^2(\Phi)  + (1-\langle\Phi\rangle) y_4^2(\Phi)
\]
%
where $y_3(\Phi)$ and $y_4(\Phi)$ are given by equations (41)
and (40), respectively, of JA98.

\end{document}
